package blog.entity;

import java.util.Arrays;
import java.util.Date;

public class User {
	   private Integer userId;  //自增id 
	    private String userName; //账号  
	    private String userPass;  //密码
	    private String userNickname;  //昵称
	    private String userEmail;  //邮箱
	    private String userUrl;  //用户的网址
	    private String userAvatar;  //指向一个图片地址(这个字段目前只是保留字段,暂时不用)
	    private String userLastLoginIp;   //最后登录的IP
	    private Date userRegisterTime;   //用户注册的时间
	    private Date userLastLoginTime; //最后登录的时间
	    private Integer userStatus; //用户的状态
	    private byte [] userPhoto;  //用户照片,存的是具体的照片数据
	    private Integer articleCount;//用户发表的文章数量, 不是数据库字段 ,由计算得到
	    public Integer getUserId() {
			return userId;
		}
		public void setUserId(Integer userId) {
			this.userId = userId;
		}
		public String getUserName() {
			return userName;
		}
		public void setUserName(String userName) {
			this.userName = userName;
		}
		public String getUserPass() {
			return userPass;
		}
		public void setUserPass(String userPass) {
			this.userPass = userPass;
		}
		public String getUserNickname() {
			return userNickname;
		}
		public void setUserNickname(String userNickname) {
			this.userNickname = userNickname;
		}
		public String getUserEmail() {
			return userEmail;
		}
		public void setUserEmail(String userEmail) {
			this.userEmail = userEmail;
		}
		public String getUserUrl() {
			return userUrl;
		}
		public void setUserUrl(String userUrl) {
			this.userUrl = userUrl;
		}
		public String getUserAvatar() {
			return userAvatar;
		}
		public void setUserAvatar(String userAvatar) {
			this.userAvatar = userAvatar;
		}
		public String getUserLastLoginIp() {
			return userLastLoginIp;
		}
		public void setUserLastLoginIp(String userLastLoginIp) {
			this.userLastLoginIp = userLastLoginIp;
		}
		@Override
		public String toString() {
			return "User [userId=" + userId + ", userName=" + userName + ", userPass=" + userPass + ", userNickname="
					+ userNickname + ", userEmail=" + userEmail + ", userUrl=" + userUrl + ", userAvatar=" + userAvatar
					+ ", userLastLoginIp=" + userLastLoginIp + ", userRegisterTime=" + userRegisterTime
					+ ", userLastLoginTime=" + userLastLoginTime + ", userStatus=" + userStatus + ", userPhoto="
					+ Arrays.toString(userPhoto) + "]";
		}
		public Date getUserRegisterTime() {
			return userRegisterTime;
		}
		public void setUserRegisterTime(Date userRegisterTime) {
			this.userRegisterTime = userRegisterTime;
		}
		public Date getUserLastLoginTime() {
			return userLastLoginTime;
		}
		public void setUserLastLoginTime(Date userLastLoginTime) {
			this.userLastLoginTime = userLastLoginTime;
		}
		public Integer getUserStatus() {
			return userStatus;
		}
		public void setUserStatus(Integer userStatus) {
			this.userStatus = userStatus;
		}
		public byte[] getUserPhoto() {
			return userPhoto;
		}
		public void setUserPhoto(byte[] userPhoto) {
			this.userPhoto = userPhoto;
		}
		public Integer getArticleCount() {
			return articleCount;
		}
		public void setArticleCount(Integer articleCount) {
			this.articleCount = articleCount;
		}
}
